package mn.idax.exchange.otc.mapper;

import mn.idax.exchange.otc.entity.User;
import mn.idax.exchange.otc.entity.UserExample;
import mn.idax.exchange.otc.vo.UserCertificateInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExampleWithRowbounds(UserExample example, RowBounds rowBounds);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);
    User selectByAccount(@Param("account") String account);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int batchUpdateNickName();

    List<UserCertificateInfo> getUserCertificateName(@Param("buyer")Integer buyer, @Param("seller")Integer seller);

    /**
     * 获取被禁止场外交易的用户
     * @return
     */
    List<Integer> getMoreThanThreeCancelUser();
}